Skip to main content

stockmanagement

Table: stockmanagement

The stockmanagement table stores the vaccine stock movements, balances, and wastage details for each vaccination center.

Columns

Column NameData TypeConstraintsDescription
stockIdint(11)NOPrimary key identifying each stock record
closingBalanceint(11)NOClosing stock balance for the day
consumedDosesint(11)NONumber of doses consumed
createdDatedatetimeYESDate when the stock record was created
lastEditedDatedatetimeYESDate when the stock record was last edited
openingBalanceint(11)NOOpening stock balance for the day
recievedDosesint(11)NONumber of doses received
stockDatedateYESDate of the stock entry
vaccinationCenterIdint(11)YESID of the vaccination center
vaccineIdsmallint(6)YESID of the vaccine
voidedtinyint(1)YESFlag indicating if record is voided
voidedDatedatetimeYESDate when record was voided
voidedReasonvarchar(50)YESReason for voiding the record
wastageint(11)NONumber of doses wasted
createdByUserIdint(11)YESUser who created the record
lastEditedByUserIdint(11)YESUser who last edited the record

Indexes

  • stock_vaccinationCenterId_vaccinationcenter_mappedId_FK — Index on vaccinationCenterId
  • stockvaccine_vaccineId_vaccine_vaccineId_FK — Index on vaccineId
  • mappedIdIdMapper_pk_fk — Index on createdByUserId

Foreign Key Relations

  • vaccinationCenterId → vaccinationcenter.mappedId
  • createdByUserId → user.mappedId
  • vaccineId → stockvaccine.stockVaccineId

Usage Notes

  • Tracks daily stock activities, including opening, closing, wastage, consumption, and receipts.
  • Helps in monitoring inventory levels and auditing stock movements.